#pragma once
namespace graph
{
   namespace algorithm
   {
      typedef std::pair<point_t, point_t> line_t; //line to draw in debugger
      typedef std::vector<line_t> output_list_fwd_t; //collection of lines to draw in debugger
      //vertex_debug_t - data to draw visited vertex and visuaize it's properties
      struct vertex_debug_t
      {
          vertex_debug_t()
            :  distance_(0)
            ,  heuristic_(0)
            ,  lat_(0)
            ,  lon_(0)
            ,  id_(0)
          {}
          lat_lon_t distance_;
          lat_lon_t heuristic_;
          lat_lon_t lat_;
          lat_lon_t lon_;
          vertex_id_t id_;
      };
      
      struct alg_debug_info_t
      {         
         //list of vertex pairs (edges) to draw them
         output_list_fwd_t output_list_fwd_;
         output_list_fwd_t output_list_bkwd_;
         
         //Data containers' statistics
         graph_int_t min_queue_fwd_put_calls_;
         graph_int_t min_queue_fwd_isin_calls_;
         graph_int_t min_queue_fwd_extract_min_fwd_calls_;
         graph_int_t min_queue_fwd_chpriority_calls_;
         graph_int_t min_queue_fwd_max_elems_;
         graph_int_t closed_list1_put_calls_;
         graph_int_t closed_list1_isin_calls_;
         graph_int_t set_predecessor_fwd_calls_;
         graph_int_t get_distance_fwd_calls_;
         //alg statistics
         graph_int_t num_iterates_;
         graph_int_t num_iterates2_;
         graph_int_t visited_vertices_;
         graph_int_t visited_vertices2_;
         graph_int_t visited_edges_;
         graph_int_t visited_edges2_;
         //curent iteration information
         vertex_debug_t deb_vertex_current1_;
         vertex_debug_t deb_vertex_current2_;
         vertex_debug_t deb_vertex_prev1_;
         vertex_debug_t deb_vertex_prev2_;
         std::vector<vertex_debug_t> deb_vertex_prev1_adj;
         std::vector<vertex_debug_t> deb_vertex_prev2_adj;
         vertex_id_t prev_vertex1_id_;
         vertex_id_t prev_vertex2_id_;
         
         alg_debug_info_t()
         {
            num_iterates_ = 0;
            num_iterates2_ = 0;
            visited_vertices_ = 0;
            visited_vertices2_ = 0;
            visited_edges_ = 0;
            visited_edges2_ = 0;

            deb_vertex_current1_.id_ = 0;
            deb_vertex_current2_.id_ = 0;
            deb_vertex_prev1_.id_ = 0;
            deb_vertex_prev2_.id_ = 0;
  
            min_queue_fwd_put_calls_ = 0;
            min_queue_fwd_isin_calls_ = 0;
            min_queue_fwd_extract_min_fwd_calls_ = 0;
            min_queue_fwd_chpriority_calls_ = 0;
            min_queue_fwd_max_elems_ = 0;
            closed_list1_put_calls_ = 0;
            closed_list1_isin_calls_ = 0;
            set_predecessor_fwd_calls_ = 0;
            get_distance_fwd_calls_ = 0;
         }
      };      
      typedef std::auto_ptr<alg_debug_info_t> alg_debug_info_ptr_t;
   }
}